package io.renren.modules.tms.entity;

import io.renren.common.utils.Constant;
import lombok.Data;

import java.util.Calendar;
import java.util.Date;

@Data
public class ShipmentErrorReturn implements Comparable<ShipmentErrorReturn>{

	/** 运单号 **/
	private String shipmentNo;

	/** 订单号 **/
	private String orderNo;

	private String jdeNo;

	/** 运单生成时间 **/
	private Date insertDate;

	/** 承运商单号 **/
	private String carrierShipmentNo;

	/** 承运商名称 **/
	private String carrierName;

	/** 运单状态 **/
	private String shipmentStatus;

	/** 异常类型 {@link Constant.INTERFACE_ERROR_TYPE}**/
	private String errorType;

	/** 错误详情 **/
	private String errorDetail;

	private String originCode;

	private String originName;

	private String destCode;

	private String destName;

	private String organizationCode;

	private String organizationName;

	private String receiveOrganizationName;

	private String sectionId;

	@Override
	public int compareTo(ShipmentErrorReturn from) {
		if (insertDate == null || from.getInsertDate() == null){
			return 0;
		}
		return from.getInsertDate().compareTo(insertDate);
	}
}
